<!--%import("popup.js")-->
<!--%import("popup.css")-->
<!--%import("filter/insert_poll.xml")-->
<!--%import("../lang")-->

<!--// datepicker javascript plugin load -->
<!--%load_js_plugin("ui.datepicker")-->

<script>
    var msg_poll_cannot_modify = "{$lang->msg_poll_cannot_modify}";
</script>
<section class="section">
	<h1>{$component_info->title} ver. {$component_info->version}</h1>
	<form action="./" method="post" id="fo_component" onSubmit="procFilter(this, insert_poll); return false;" class="x_form-horizontal">
		<input type="hidden" name="component" value="{$component_info->component_name}" />
		<input type="hidden" name="method" value="insertPoll" />
		<input type="hidden" name="poll_srl" value="" />
		<div class="x_control-group">
			<label for="" class="x_control-label">{$lang->poll_stop_date}</label>
			<div class="x_controls">
				<input type="hidden" name="stop_date" id="stop_date" value="{date('Ymd',time()+60*60*24*30)}" />
				<input type="date" class="inputDate" value="{date('Y-m-d',time()+60*60*24*30)}" />
<script>
(function($){
$(function(){
	var option = {
		changeMonth:true
		,changeYear:true
		,gotoCurrent: false
		,yearRange:'-100:+10'
		, onSelect:function(){
			$(this).prev('input[type="hidden"]').val(this.value.replace(/-/g,""));
		}
		,minDate: new Date("{date('Y-m-d',time()+60*60*24*30)}")
	};
	$.extend(option,$.datepicker.regional['{$lang_type}']);
	$(".inputDate").datepicker(option);
});
})(jQuery);
</script>

			</div>
		</div>
		<div class="x_control-group">
			<label for="" class="x_control-label">{$lang->skin}</label>
			<div class="x_controls">
				<select name="skin">
				<!--@foreach($skin_list as $skin=>$skin_info)-->
				<option value="{$skin}">{$skin_info->title} (skin by {$skin_info->maker->name})</option>
				<!--@end-->
				</select>
			</div>
		</div>
	<div id="poll_source" style="display:none">
		<div class="table">
		<table class="x_table x_table-striped x_table-hover">
			<thead>
			<col width="100" />
			<col />
			</thead>
			<tbody>
			<tr>
				<th scope="row"><div>{$lang->poll_chk_count}</div></th>
				<td><input type="text" name="checkcount_tidx" value="1" size="1"  /></td>
			</tr>
			<tr>
				<th scope="row"><div>{$lang->poll_title}</div></th>
				<td><input type="text" name="title_tidx" /></td>
			</tr>
			
			<tr>
				<th scope="row"><div>{$lang->poll_item} 1</div></th>
				<td><input type="text" name="item_tidx_1" /></td>
			</tr>
			
			<tr>
				<th scope="row"><div>{$lang->poll_item} 2</div></th>
				<td><input type="text" name="item_tidx_2" /></td>
			</tr>
			</tbody>
		</table>
		</div>
		<button type="button" class="_add_item x_btn">{$lang->cmd_add_item}</button>
		<button type="button" class="_del_item x_btn">{$lang->cmd_del_item}</button>
		<button type="button" class="_del_poll x_btn">{$lang->cmd_del_poll}</button>
		</div>
		<div class="x_clearfix btnArea">
			<div class="x_pull-right">
				<button type="submit" class="x_btn x_btn-primary" />{$lang->cmd_submit}</button>
				<button type="button" id="add_poll" class="x_btn">{$lang->cmd_add_poll}</button>
				<a class="x_btn" href="{getUrl('','module','editor','act','dispEditorComponentInfo','component_name',$component_info->component_name)}" target="_blank" onclick="window.open(this.href,'ComponentInfo','width=10,height=10');return false;">{$lang->about_component}</a>
			</div>
		</div>
	</form>
</section>
